Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add expect_no_lint #2582

Merged
merged 8 commits into from
May 27, 2024
Merged

Add expect_no_lint #2582

merged 8 commits into from
May 27, 2024

Conversation

F-Noelle
Copy link
Contributor

@F-Noelle F-Noelle commented May 23, 2024

This pull request is meant to address issue #2580.

This is probably the easiest way to add such a function. I assume with time the tests should be updated to use one over the other.

@AshesITR
Copy link
Collaborator

Thanks for this. I would suggest adding a NEWS bullet crediting yourself and citing the issue number, as well as updating our test suite to use the new function.

@MichaelChirico
Copy link
Collaborator

updating our test suite to use the new function.

I would hold this for follow-up actually, that will be several-hundred-lines change, better to keep this PR focused on the minimal change to get this added.

To that end we probably want a expect_no_lint_linter() 😄

@F-Noelle
Copy link
Contributor Author

Added NEWS item and yeah the test suit update will be massive.

I actually thought about an expect_no_lint_linter(). It kind of is obvious when you think about it, but it is also super silly.😄

@AshesITR
Copy link
Collaborator

Follow up PR for the migration sounds fine.

R/expect_lint.R Outdated Show resolved Hide resolved
R/expect_lint.R Outdated Show resolved Hide resolved
AshesITR
AshesITR previously approved these changes May 27, 2024
Copy link
Collaborator

@AshesITR AshesITR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice!

NEWS.md Outdated Show resolved Hide resolved
@@ -42,7 +44,8 @@
expect_lint <- function(content, checks, ..., file = NULL, language = "en") {
if (!requireNamespace("testthat", quietly = TRUE)) {
stop( # nocov start
"'expect_lint' is designed to work within the 'testthat' testing framework, but 'testthat' is not installed.",
"'expect_lint' and 'expect_no_lint' are designed to work within the 'testthat' testing framework, ",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally this will just reference the actual call for clarity, but we can save that for later.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@MichaelChirico MichaelChirico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@AshesITR AshesITR merged commit 1d6fbf7 into r-lib:main May 27, 2024
20 checks passed
@F-Noelle F-Noelle deleted the expect_no_lint branch May 27, 2024 19:11
@IndrajeetPatil IndrajeetPatil linked an issue May 27, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New function expect_no_lint() akin to expect_no_warning() etc
3 participants